package com.iticit.exception;

import com.iticit.constant.CodeConstant;

import java.io.Serializable;

public class BusinessException extends RuntimeException implements Serializable {
	private static final long serialVersionUID = 7539926864018222651L;
	private String code;
	private String message;
	public BusinessException(CodeConstant codeConstant) {
		super(codeConstant.getMessage());
		this.code = codeConstant.getCode();
		this.message = codeConstant.getMessage();
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@Override
	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}
}
